Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

DBTableVectors

Adopted By:	DBTableVector

Declared In:	dbkit/tableProtocols.h

Protocol Description

Methods in the DBTableVectors protocol are used to specify the formatting of cells within a DBTableView.  In general, a format applies throughout a vector (that is, one of the table's rows or columns).  When a DBTableView is structured so that attributes are shown as static columns while records are dynamically arranged on successive rows, there is usually a separate format for each static column, but a single row format that applies to all rows.

An identifier identifies an attribute (that is, a field) as it is known to the data source from which data is being taken.  (The data source is an association to a fetch group for DBRecordList or DBRecordStream.  Fields in the associated data source may be at different positions or have different names from those used in the display.)

A formatter is the DBFormatter object responsible for formatting the display.

Method Types

Controlling/reporting formatter	- formatter
- setFormatter:

Controlling/reporting data link	- identifier
- setIdentifier:

Controlling/reporting editing	- isEditable
- setEditable:

Controlling/reporting size	- isResizable
- setResizable:
- isAutosizable
- setAutosizable:
- size
- sizeTo:
- minSize
- setMinSize:
- maxSize
- setMaxSize:

Controlling/reporting title	- title
- setTitle:
- titleFont
- setTitleFont:
- titleAlignment
- setTitleAlignment:

Controlling/reporting content alignment
- contentAlignment
- setContentAlignment:

Instance Methods

contentAlignment

- (int)contentAlignment

Returns the horizontal alignment of the row or column's content. The return value can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

formatter

- formatter

Returns the formatter responsible for displaying items.

identifier

- identifier

Returns the property of the data source from which the displayed data is taken.

isAutosizable

- (BOOL)isAutosizable

Returns YES if the row or column is autosizable (that is, it resizes itself in response to a change in the DBTableView's content view).

isEditable

- (BOOL)isEditable

Returns YES if the displayed row or column is editable.

isResizable

- (BOOL)isResizable

Returns YES if the row or column is resizable (that is, it permits the user to change its width in the display).

maxSize

- (NXCoord)maxSize

Returns a vector's greatest permissible size (the width or a column or the height of a row).

minSize

- (NXCoord)minSize

Returns a vector's least permissible size (the width or a column or the height of a row).

setAutosizable:

- setAutosizable:(BOOL)flag

Permits or prohibits autosizing of the row or column, as the value of flag is YES or NO.

setContentAlignment:

- setContentAlignment:(int)align

Sets the horizontal alignment of the row or column's content. The argument align can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

setEditable:

- setEditable:(BOOL)flag

Permits or prohibits editing of the row or column, as the value of flag is YES or NO.

setFormatter:

- setFormatter:newFormatter

Makes newFormatter the object responsible for displaying an item in this vector (row or column).  Returns self.

setIdentifier:

- setIdentifier:aDataAttribute

Sets the attribute of the data source from which the displayed data is taken.

setMaxSize:

- setMaxSize:(NXCoord)newMaxSize

Sets a vector's greatest permissible size (the width or a column or the height of a row)

setMinSize:

- setMinSize:(NXCoord)newMinSize

Sets a vector's least permissible size (the width or a column or the height of a row).

setResizable:

- setResizable:(BOOL)flag

Permits or prohibits resizing the row or column, as flag is YES or NO.

setTitle:

- setTitle:(const char *)title

Sets the title of the row or column to title.

setTitleAlignment:

- setTitleAlignment:(int)align

Sets the horizontal alignment of the row or column's title. The argument align can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

setTitleFont:

- setTitleFont:fontObj

Sets the font used to draw the row or column's title to fontObj.

size

- (NXCoord)size

Returns the width and height of the display cell.

sizeTo:

- (NXCoord)sizeTo:(NXCoord)newSize

Sets the width and height of the display cell to the values in newSize. Returns self.

title

- (const char *)title

Returns the title of the row or column.

titleAlignment

- (int)titleAlignment

Returns the horizontal alignment of the row or column's title. The return value can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

titleFont

- titleFont

Returns (as a Font object) the font for the row or column's title.